import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Index from '@/pages/Index'
import DaoH from '@/pages/DaoH'
// 左边路由
// import Home from '../components/Home'
const Home = () => import('../components/Home')
// 控制台
const Control = () => import('../components/Control')
// 管理员  角色信息
const HouTai = () => import('../AdminP/HouTai')
const QuanXian = () => import('../AdminP/QuanXian')
const RoleAdmin = () => import('../AdminP/RoleAdmin')
const NewAdd = () => import('../AdminP/NewAdd')

const SetPermission = () => import('../AdminP/SetPermission')
// const Search= () => import('../AdminP/Search')
// const Admin = () => import('../components/Admin')
//人员路由

const KaoQin = () => import('../RenYuanP/KaoQin')
const LaoDongLi = () => import('../RenYuanP/LaoDongLi')

const PeiXun = () => import('../RenYuanP/PeiXun')
const RenYuanAdmin = () => import('../RenYuanP/RenYuanAdmin')
const XiangMuGroup = () => import('../RenYuanP/XiangMuGroup')
const ZhengJian = () => import('../RenYuanP/ZhengJian')
const BianJi = () => import('../RenYuanP/BianJi')

//机械


//现场车辆
// const ChuRuKou = () => import('../CheLiang/ChuRuKou')
const CLJianKong = () => import('../CheLiang/CLJianKong')
const CLXinXi = () => import('../CheLiang/CLXinXi')


//================================================
const TaDiao = () => import('../components/TaDiao')

const HuanJing = () => import('../components/HuanJing')

// 项目档案
const XiangMuDangAn = () => import('../components/XiangMuDangAn')
import Danwei from '../XiangMup/Danwei'
import DangAn from '../XiangMup/DangAn'
import Jiedian from '../XiangMup/Jiedian'
import Liangdian from '../XiangMup/Liangdian'
import Pingmiantu from '../XiangMup/Pingmiantu'
import Xiaoguotu from '../XiangMup/Xiaoguotu'
import Xinxi from '../XiangMup/Xinxi'
import Xuanchuanpian from '../XiangMup/Xuanchuanpian'

//系统设置
const XiTongSheZhi = () => import('../components/XiTongSheZhi')
// import XiTongSheZhi from '../components/XiTongSheZhi'
import QiYe from '../TopCaiDan/QiYe'
//消息信息
import XiaoXiXinXi from '../components/XiaoXiXinXi'
import BaoJing from '../TopCaiDan/BaoJing'
import XiaoXiLB from '../TopCaiDan/XiaoXiLB'
import Monitor from '../components/Monitor'

//机械设备管理

import SheBei from '../GIXiep/SheBei'
import MeiJin from '../GIXiep/MeiJin'
import JianKong from '../GIXiep/JianKong'
import DianLiJianCe from '../GIXiep/DianLiJianCe'
// import KaoQinSheBei from '../GIXiep/KaoQinSheBei'
import TaDiaoSheBei from '../GIXiep/TaDiaoSheBei'
import CheLiangShiBie from '../GIXiep/CheLiangShiBie'
import HuanJingJianCe from '../GIXiep/HuanJingJianCe'
import Jikang from '../GIXiep/Jikang'
// 人员新增
// 人员管理新增
import Addrygl from '../RenYuanP/Addrygl.vue'
//项目班组新增
import AddXiangMuGroup from '../RenYuanP/AddXiangMuGroup'
//项目班组编辑
import BianjiXmbz from '../RenYuanP/BianjiXmbz'
import MeiJinAdd from '../GIXiep/menjinadd.vue'
import Management from '../RenYuanP/Management.vue'
// 培训管理新增
import Addpeixun from '../RenYuanP/Addpeixun.vue'
// 培训管理编辑
import Bianjipei from '../RenYuanP/Bianjipei.vue'

//人员管理劳动力编辑
import BianjiLao from '../RenYuanP/BianjiLao.vue'
//人员管理劳动力新增
import Laborforce from '../RenYuanP/Laborforce.vue'
//证件到期查看
import SeeZhengJian from '../RenYuanP/SeeZhengJian.vue'
import Compile from '../RenYuanP/Compile.vue'
//机械新增
import Entrance from '../GIXiep/Entrance'//门禁
import EntranceBj from '../GIXiep/EntranceBj'//门禁
import Newmonitoring from '../GIXiep/Newmonitoring'//监控
import MonitoringBJ from '../GIXiep/MonitoringBJ'//监控
import Evuelectricity from '../GIXiep/Evuelectricity'//电力
import EvuelectricityBJ from '../GIXiep/EvuelectricityBJ'//电力
import Newtower from '../GIXiep/Newtower'//塔吊
import TowerBJ from '../GIXiep/TowerBJ'//塔吊
import Newvehicle from '../GIXiep/Newvehicle'//车辆
import vehicleBJ from '../GIXiep/vehicleBJ'//车辆
import Newjikang from '../GIXiep/Newjikang'//基抗
import JikangBJ from '../GIXiep/JikangBJ'//基抗
import Newhuanjing from '../GIXiep/Newhuanjing'//环静
import HuanjingBJ from '../GIXiep/HuanjingBJ'//环静


// 任务信息管理
// const RenWu = () => import('../components/RenWup')
// import Renwu from '../RenWup/Renwu'//任务管理
import Xiaoxi from '../RenWup/Xiaoxi'//消息管理
import BjJv from '../RenWup/BjJv'//报警记录
// import Bjst from '../RenWup/Bjst'//报警视图


// 个人中心
// const PersonalCentre = () => import('../components/PersonalCentre')
import PersonalCentre from '../components/PersonalCentre'

Vue.use(Router)

export default new Router({
  // mode:'history',
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [
        // 个人中心
        {
          path: 'PersonalCentre',
          name: '个人中心',
          component: PersonalCentre,
        },
        // 控制台
        {
          path: 'control',
          name: '控制台',
          component: Control,
        },
        //  管理员
        {
          path: 'houtai',
          name: '后台管理者页面',
          component: HouTai,
        },
        {
          path: 'newadd',
          name: '后台新增页面',
          component: NewAdd,
        },
        {
          path: 'setpermission',
          name: '设置权限',
          component: SetPermission,
        },


        {
          path: 'quanxian',
          name: '权限管理',
          component: QuanXian,
        },
        {
          path: 'role',
          name: '角色管理',
          component: RoleAdmin,
        },

        // 人员实名管理
        {
          path: 'kaoqinxinxi',
          name: '考勤信息',
          component: KaoQin,
        },
        {
          path: 'laodongli',
          name: '劳动力计划投入',
          component: LaoDongLi,
        },
        // {
        //   path: 'laodongli',
        //   name: '劳动力计划投入',
        //   component: LaoDongLi,
        // },
        {
          path: 'laborforce',
          name: '劳动力新增',
          component: Laborforce,
        },
        {
          path: 'bianjilao',
          name: '劳动力编辑',
          component: BianjiLao,
        },

        {
          path: 'peixun',
          name: '培训管理',
          component: PeiXun,
        },

        {
          path: 'training',
          name: '培训管理新增',
          component: Addpeixun,
        },
        {
          path: 'Bianjipei',
          name: '培训管理编辑',
          component: Bianjipei,
        },

        {
          path: 'rygl',
          name: '人员管理',
          component: RenYuanAdmin,
        },
        {
          path: 'addrygl',
          name: '人员管理新增',
          component: Addrygl,
        },
        // {
        //   path: 'management',
        //   name: '班组管理新增',
        //   component: Management,
        // },
        {
          path: 'xmbz',
          name: '项目班组',
          component: XiangMuGroup,
        },
        // {
        //   path: 'compile',
        //   name: '班组编辑新增',
        //   component: Compile
        // },
        {
          path: 'addxmbz',
          name: '项目班组新增',
          component: AddXiangMuGroup,
        },
        {
          path: 'BianjiXmbz',
          name: '项目班组编辑',
          component: BianjiXmbz,
        },
        {
          path: 'zjdq',
          name: '证件到期',
          component: ZhengJian,
        },
        {
          path: 'seezjdq',
          name: '查看证件到期',
          component: SeeZhengJian,
        },
        //机械设备

        {
          path: 'sbjc',
          name: '设备监测',
          component: SheBei,
        },
        {
          path: 'meijin',
          name: '门禁设备',
          component: MeiJin,
        },
        // 门禁新增
        {
          path: 'entrance',
          name: '门禁设备管理',
          component: Entrance,
        },
        // 门禁编辑
        {
          path: 'entranceBj',
          name: '门禁设备编辑',
          component: EntranceBj,
        },

        // {
        //   path: 'meijinadd',
        //   name: '门禁设备新增',
        //   component: MeiJinAdd,
        // },
        {
          path: 'jiankong',
          name: '监控设备',
          component: JianKong,
        },
        // 监控新增
        {
          path: 'newmonitoring',
          name: '新增监控设备',
          component: Newmonitoring,
        },
        //监控 编辑
        {
          path: 'monitoringBJ',
          name: '编辑监控设备',
          component: MonitoringBJ,
        },


        {
          path: 'dianli',
          name: '电力监测设备',
          component: DianLiJianCe,
        },
        //新增
        {
          path: 'evuelectricity',
          name: '新增电力设备',
          component: Evuelectricity,
        },
        //编辑
        {
          path: 'evuelectricityBJ',
          name: '编辑电力设备',
          component: EvuelectricityBJ,
        },
      
        {
          path: 'td',
          name: '塔吊设备',
          component: TaDiaoSheBei,
        },
        //新增
        {
          path: 'newtower',
          name: '新增塔吊设备',
          component: Newtower,
        },
        //编辑
        {
          path: 'towerBJ',
          name: '新增塔吊编辑',
          component: TowerBJ,
        },
        {
          path: 'jk',
          name: '基坑',
          component: Jikang,
        },
        //新增
        {
          path: 'jkxz',
          name: '新增基坑设备',
          component: Newjikang,
        },
        //编辑
        {
          path: 'jkbj',
          name: '基坑设备编辑',
          component: JikangBJ,
        },
        {
          path: 'cheliang',
          name: '车辆识别设备',
          component: CheLiangShiBie,
        },
        {
          path: 'newvehicle',
          name: '新增辆识别设备',
          component: Newvehicle,
        },
        {
          path: 'vehicleBJ',
          name: '编辑车辆识别设备',
          component: vehicleBJ,
        },
        
        {
          path: 'hjjc',
          name: '环境监测',
          component: HuanJingJianCe,
        },
        //新增环境监测
        {
          path: 'newhuanjing',
          name: '新增环境监测',
          component: Newhuanjing,
        },
        //编辑
        {
          path: 'huanjingBJ',
          name: '编辑环境监测',
          component: HuanjingBJ,
        },

        //现场车辆管理
        // {
        //   path: 'xianchang',
        //   name: '现场车辆管理',
        //   component: XianChang,
        //   children: [
     
        {
          path: 'cljk',
          name: '车辆监控系统',
          component: CLJianKong,
        },
        {
          path: 'clxx',
          name: '车辆信息',
          component: CLXinXi,
        },
      
        {
          path: 'bjym',
          name: '编辑页面',
          component: BianJi,
        },
        //   ]
        // },
        {
          path: 'tadiao',
          name: '塔吊监测系统',
          component: TaDiao,
        },
        {
          path: 'huanjing',
          name: '环境监测系统',
          component: HuanJing,
        },
     
      //  任务信息管理
         // 消息管理
         {
          path: 'xiaoxi',
          name: '信息管理',
          component: Xiaoxi,
        },
        {
          path: 'jilv',
          name: '报警记录',
          component: BjJv,
        },
        // {
        //   path: 'shitu',
        //   name: '报警视图',
        //   component: Bjst,
        // },
      // 项目档案管理
        {
          path: 'xiangmudangan',
          name: '项目档案管理',
          component: XiangMuDangAn,
        },
        {
          path: 'xinxi',
          name: '项目信息',
          component: Xinxi,
        },
        {
          path: 'dw',
          name: '参建单位',
          component: Danwei,
        },
        {
          path: 'jd',
          name: '项目节点',
          component: Jiedian,
        },
        {
          path: 'da',
          name: '项目档案',
          component: DangAn,
        },
        {
          path: 'ld',
          name: '项目亮点',
          component: Liangdian,
        },
        {
          path: 'xcp',
          name: '项目宣传片',
          component: Xuanchuanpian,
        },
        {
          path: 'pmt',
          name: '项目平面图',
          component: Pingmiantu,
        },
        {
          path: 'xgt',
          name: '项目效果图',
          component: Xiaoguotu,
        },
        {
          path: 'xtsz',
          name: '系统设置',
          component: XiTongSheZhi,
          children: [
            {
              path: 'qyxx',
              name: '企业信息',
              component: QiYe,
            }
          ]
        },
        {
          path: 'xiaoxixinxi',
          name: '消息信息',
          component: XiaoXiXinXi,
          children: [
            {
              path: 'xxlb',
              name: '消息列表',
              component: QiYe,
            },
            {
              path: 'bjst',
              name: '报警视图',
              component: BaoJing,
            },
          ]
        },
      ]
    },
    {
      path: '/monitor',
      name: '监控大屏',
      component: Monitor,
    },
    {
      path: '/daohang',
      name: '导航',
      component: DaoH,
      children: [{
        path: 'index',
        name: '首页',
        component: Index,
      }]
    }

  ]
})
